<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<#assign pojoNameLower = util.getLowerCaseFirstLetter(pojo.shortName)>
<#assign pojoNamePlural = util.getPluralForWord(pojoNameLower)>

<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="sj" uri="http://java.malethan.com/seemorej/taglib/seemorej.tld" %>

<html>
<head>
    <title>Editing ${util.humaniseCamelCase(pojo.shortName)} #<c:out value="${'$'}{${pojoNameLower}.${pojo.getIdentifierProperty().name}}" /></title>
</head>
<body>

<%-- TODO: use something more concise to generate URLs --%>
<c:set var="updateUrl">
  <c:url value="/seemore">
    <c:param name="sjController" value="${'$'}{param.sjController}" />
    <c:param name="sjAction" value="update" />
    <c:param name="sjFormat" value="html" />
  </c:url>
</c:set>

<c:set var="cancelUrl">
  <c:url value="/seemore">
    <c:param name="sjController" value="${'$'}{param.sjController}" />
    <c:param name="sjAction" value="show" />
    <c:param name="id" value="${'$'}{${pojoNameLower}.${pojo.getIdentifierProperty().name}}" />
    <c:param name="sjFormat" value="html" />
  </c:url>
</c:set>

<form action="<c:out value="${'$'}{updateUrl}"/>" method="post">

<#include "form-partial.ftl" />

</form>

</body>
</html>